<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <table id="sampleTable" border="1">
    <tr>
      <td>Row1 cell1</td>
      <td>Row1 cell2</td>
    </tr>
    <tr>
      <td>Row2 cell1</td>
      <td>Row2 cell2</td>
    </tr>
  </table>
  <button>点击添加</button>
  <script>
    document.querySelector('button').onclick = function () {
      let table = document.querySelector('table')
      console.log(table)
      let trs = document.createElement('tr')
      let tds = document.createElement('td')
      let text = document.createTextNode('Holle word')
      tds.appendChild(text)
      trs.appendChild(tds)
      table.appendChild(trs)
    }
  </script>
</body>

</html>